package com.teradyne.merlin2.ui.shared.models;

import java.io.Serializable;

public class RequestStatus implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2067298564833545417L;

	private String type;
	private String contact;
	private String referenceNo;
	private String lineNo;
	private String partNo;
	private String partSerialNo;
	private String quantity;
	private String shipmentNo;
	private String serviceType;
	private String dateCreated;
	private String status;

	public RequestStatus() {
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	public String getReferenceNo() {
		return referenceNo;
	}

	public void setReferenceNo(String referenceNo) {
		this.referenceNo = referenceNo;
	}

	public String getLineNo() {
		return lineNo;
	}

	public void setLineNo(String lineNo) {
		this.lineNo = lineNo;
	}

	public String getPartNo() {
		return partNo;
	}

	public void setPartNo(String partNo) {
		this.partNo = partNo;
	}

	public String getPartSerialNo() {
		return partSerialNo;
	}

	public void setPartSerialNo(String partSerialNo) {
		this.partSerialNo = partSerialNo;
	}

	public String getQuantity() {
		return quantity;
	}

	public void setQuantity(String quantity) {
		this.quantity = quantity;
	}

	public String getShipmentNo() {
		return shipmentNo;
	}

	public void setShipmentNo(String shipmentNo) {
		this.shipmentNo = shipmentNo;
	}

	public String getServiceType() {
		return serviceType;
	}

	public void setServiceType(String serviceType) {
		this.serviceType = serviceType;
	}

	public String getDateCreated() {
		return dateCreated;
	}

	public void setDateCreated(String dateCreated) {
		this.dateCreated = dateCreated;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public void extractRequestStatus(OrderRequest orderRequest, OrderHeader orderHeader, OrderLine orderLine) {
		this.type = "Order Request";
		this.contact = orderHeader.getContactName() + " " + orderHeader.getContactMiddleName() + " " + orderHeader.getContactLastName();
		this.referenceNo = String.valueOf(orderRequest.getOrderRequestId());
		this.lineNo = orderLine.getLineNo();
		this.partNo = orderLine.getPartNo();
		this.partSerialNo = orderLine.getPartSerialNumber();
		this.quantity = String.valueOf(orderLine.getQuantity());
		this.serviceType = orderLine.getServiceType();
		this.dateCreated = orderRequest.getDateCreated();
		this.status = orderLine.getStatusOrderLine();

	}

}
